home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj8506.arc
/
TRYDIR.C
< prev
next >
Wrap
Text File
|
1986-09-14
|
640b
|
23 lines
/* trydir.c - try directory scan functions - Ctools2 */
#include "stdio.h"
#include "direct.h"
char spec[80] ;
main()
{
int ret , attr ;
FSPEC dir ;
printf(" spec and attr(Hex): \n");
scanf("%s %x",spec,&attr) ;
printf("\n\n");
ret = drsfirst(spec,attr,&dir) ; /* get 1st file entry*/
while( ret == 0 ) /* repeat til search fails */
{ printf(" %s %8ld bytes attr=%02x \n",
dir.fname , dir.fsize , dir.fattr) ;
ret = drsnext(&dir) ; /* get next file entry */
}
printf("\n ret = %d \n",ret) ;
}